import React, { PropTypes } from 'react';
import {
    Framework7App, Statusbar, Panel, View, Navbar, Pages, Page, ContentBlock, ContentBlockTitle,
    List, ListItem, Views, NavLeft, Link, NavCenter, NavRight, GridRow, GridCol, Button, Popup,
    LoginScreen, LoginScreenTitle, ListButton, ListLabel, FormLabel, FormInput
} from 'framework7-react';
import { routes } from '../routes';

const MainViews = ( props, context ) =>
{
    return (
        <Views>
            <View id="main-view" navbarThrough dynamicNavbar={true} main url="/">
                {/* BEGIN 导航 */}
                {context.framework7AppContext.theme.ios ?
                    (
                        <Navbar>
                            <NavCenter sliding>微信测试ios</NavCenter>
                        </Navbar>
                    ) : (
                        <Navbar>
                            <NavCenter sliding>微信测试material</NavCenter>
                        </Navbar>
                    )}
                {/* END 导航 */}
                {/* BEGIN 主页 */}
                <Pages>
                    <Page>
                        {context.framework7AppContext.theme.material ? (
                            <Navbar>
                                <NavCenter sliding>微信测试material</NavCenter>
                            </Navbar>
                        ) : null}
                    </Page>
                </Pages>
                {/* END 主页 */}
            </View>
        </Views>
    );
};
MainViews.contextTypes = {
    framework7AppContext: PropTypes.object
};
export const App = () => (
    <Framework7App themeType="ios" routes={routes}>
        <Statusbar />
        <MainViews />
    </Framework7App>
);